import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
const routes: Array<RouteRecordRaw> = [
  {
    path: "/home",
    name: "首页",
    // redirect: "/home/goodsList",
    component: () => import("../pages/home/Home.vue"),
    children:[
      {
        path: "",
        name: "行政管理",
        children:[
          {
            path:'administraton',
            name:"印章管理",
            component: () => import("../pages/administraton/administraton.vue"),
          }
        ],
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "企业公告",
        children:[
          {
            path:'affiche',
            name:"公告类型",
            component: () => import("../pages/affiche/affiche.vue"),
          },
          {
            path:'affiche1',
            name:'公告列表',
            component:() => import("../pages/affiche/affiche1.vue")
          }
        ],
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "办公审批",
        children:[
          {
            path:'approval',
            name:"发起审批申请",
            component: () => import("../pages/approval/approval.vue"),
          }
        ],
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "基础数据",
        children:[{
          path:"basic",
          name:"报销类型",
          component: () => import("../pages/basic/basic.vue"),
        }],
        
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "合同协议",
        children:[{
          path:"cont",
          name:"合同权限",
          component: () => import("../pages/cont/cont.vue"),
        }],
        
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "客户管理",
        children:[{
          path:"crm",
          name:"客户权限",
          component: () => import("../pages/crm/crm.vue"),
        }],
        
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "日常办公",
        children:[{
          path:"daily",
          name:"日程安排",
          component: () => import("../pages/daily/daily.vue"),
        }],
       
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "审批设置",
        children:[{
          path:"examination",
          name:"审批类型",
          component: () => import("../pages/examination/Examination.vue"),
        }],
       
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "财务管理",
        children:[{
          path:"finance",
          name:"财务权限配置",
          component: () => import("../pages/finance/finance.vue"),
        }],
       
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "人力资源",
        children:[{
          path:"hr",
          name:"部门架构",
          component: () => import("../pages/hr/Hr.vue"),
        }],
       
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "知识库",
        children:[{
          path:"knowledge",
          name:"知识类型",
          component: () => import("../pages/knowledge/Knowledge.vue"),
        }],
       
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "项目管理",
        children:[{
          path:"pmp",
          name:"项目权限配置",
          component: () => import("../pages/pmp/pmp.vue"),
        }],
        
        meta:{
          info:true
        }
      },
      {
        path: "",
        name: "系统管理",
        children:[{
          path: "system",
          name:"权限角色",
          component: () => import("../pages/system/system.vue"),
        }],
        meta:{
          info:true
        }
      },
      {
        path: "workbench",
        name: "工作台",
        // redirect: "/home/goodsList",
        component: () => import("../pages/workbench/workbench.vue"),
        meta:{
          info:false
        }
      },
    ],
    meta:{
      info:true
    }
  },
  
  {
    path: "/login",
    name: "登录",
    // redirect: "/home/goodsList",
    component: () => import("../pages/login/Login.vue"),
    meta:{
      info:false
    }
  },
  {
    redirect:'/home',
    path:"/",
    meta:{
      info:false
    }
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;